package com.ruoyi.common.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 销售出库对象 lp_saleout
 *
 * @author ruoyi
 * @date 2023-08-25
 */
@Data
public class Saleout extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Integer saleoutId;

    /** 客户 */
    @Excel(name = "客户")
    private Integer clientId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 订单名称 */
    @Excel(name = "订单名称")
    private String orderName;

    /** 销售数量 */
    @Excel(name = "销售数量")
    private Integer marketNum;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal marketPrice;

    /** 单位 */
    @Excel(name = "单位")
    private String marketUnit;

    /** 金额合计 */
    @Excel(name = "金额合计")
    private BigDecimal marketTotal;

    /** 含税合计 */
    @Excel(name = "含税合计")
    private BigDecimal marketTax;

    /** 待收金额 */
    @Excel(name = "待收金额")
    private BigDecimal receivableAmount;

    /** 本次收款 */
    @Excel(name = "本次收款")
    private BigDecimal nowCollection;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private Integer auditStatus;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    /** 审核人 */
    @Excel(name = "审核人")
    private String auditPerson;

    private Client client;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("saleoutId", getSaleoutId())
                .append("clientId", getClientId())
                .append("orderNo", getOrderNo())
                .append("orderName", getOrderName())
                .append("marketNum", getMarketNum())
                .append("marketPrice", getMarketPrice())
                .append("marketUnit", getMarketUnit())
                .append("marketTotal", getMarketTotal())
                .append("marketTax", getMarketTax())
                .append("receivableAmount", getReceivableAmount())
                .append("nowCollection", getNowCollection())
                .append("auditStatus", getAuditStatus())
                .append("auditOpinion", getAuditOpinion())
                .append("auditTime", getAuditTime())
                .append("auditPerson", getAuditPerson())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
